package com.acme.bankapp.domain.account;


public class SavingAccount extends AbstractAccount{

    public SavingAccount(final int id, final double amount) {
        super(id, amount);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof SavingAccount)) {
            return false;
        }

        final SavingAccount sa = (SavingAccount) o;
        if ((id == sa.id) && (Double.doubleToLongBits(balance) == Double.doubleToLongBits(sa.balance))) {
            return true;
        }
        return false;
    }
}
